package com.our.learning.infrastructure.constant;

/**
 * @author : Ice'Clean
 * @date : 2023-06-07
 */
public enum ResponseStatusEnum {
    /** 标准状态码 */
    OK(0, "请求成功"),
    BAD_REQUEST(400, "请求不合法"),
    INTERNAL_SERVER_ERROR(500, "服务器出错"),

    /** 系统错误码 */
    UNKNOWN_ERROR(100, "未知异常"),
    DATABASE_ERROR(110, "数据库错误"),

    /** 错误码 */
    TIME_CONFLICT(1001, "考试时间冲突");

    /** 状态码 */
    private final int value;

    /** 附加信息 */
    private final String msg;

    ResponseStatusEnum(int value, String msg) {
        this.value = value;
        this.msg = msg;
    }

    public int value() {
        return value;
    }

    public String msg() {
        return msg;
    }
}
